package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;

import java.time.LocalDateTime;

/**
 * 粮食对象 sys_food
 *
 * @author mars
 * @date 2024-04-02
 */

@Data
@ApiModel(value = "粮食对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_food")
public class SysFood {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 名称
     */
    @Excel(name = "名称")
    @ApiModelProperty(value = "名称")
    private String name;
    /**
     * 图片
     */
    @Excel(name = "图片")
    @ApiModelProperty(value = "图片")
    private String picture;
    /**
     * 粮食类型
     */
    @Excel(name = "粮食类型")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "粮食类型")
    private Long typeId;
    /**
     * 价格
     */
    @Excel(name = "价格")
    @ApiModelProperty(value = "价格")
    private String price;
    /**
     * 库存
     */
    @Excel(name = "库存")
    @ApiModelProperty(value = "库存")
    private int amount;
    /**
     * 温度
     */
    @Excel(name = "温度")
    @ApiModelProperty(value = "温度")
    private String temperature;
    /**
     * 湿度
     */
    @Excel(name = "湿度")
    @ApiModelProperty(value = "湿度")
    private String humidity;
    /**
     * 仓库ID
     */
    @Excel(name = "仓库ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "仓库ID")
    private Long houseId;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;


    @TableField(exist = false)
    @ApiModelProperty(value = "仓库名称")
    private String houseName;

    @TableField(exist = false)
    @ApiModelProperty(value = "粮食类型名称")
    private String typeName;
}
